﻿using Downloader.Domain;
using System.Collections.Generic;

namespace Downloader.Web.Controllers.ViewModels
{
    public class CommentViewModel
    {
        public CommentViewModel(Comment comment)
        {
            this.Id = comment.Id;
            this.ArticlContent = comment.ArticlContent;
            this.Parent = comment.Parent;
            this.Content = comment.ContentText;
            this.CreateTime = comment.CreateTime;
            this.SubComment = comment.Subs;
        }
        /// <summary>
        /// 文章主键
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 文章内容
        /// </summary>
        public  ArticleContent ArticlContent { get; set; }
        /// <summary>
        /// 父级评论
        /// </summary>
        public  Comment Parent { get; set; }
        /// <summary>
        /// 评论内容
        /// </summary>
        public  string Content { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public  string CreateTime { get; set; }

        public IList<Comment> SubComment { get; set; }
    }
}